<?php

/* * ***********************************************************************************
 *
 * 	FileName: header_php.php
 * 	Desc    : This will send user activation mail again
 * 	Author  : Jensen
 * 	Date    : 2010-11-02
 *
 * *********************************************************************************** */


if( edp_isset_session( "register_userid" ) )
{
    $id = edp_getsession( "register_userid" );
    $password = edp_getsession( "register_password" );
    
    $userdao = GetUserDAO();
    $userinfo = $userdao->GetUserByID($id);
    $nick = $userinfo['nick'];
    $email = $userinfo['email'];

    $activationUrl = edp_href_link( PAGENAME_ACTIVATE, "uid=$id&username=$nick&stamp=".base64_encode($password)."&c=".EdpGetActivationCode($id, $nick) );

    $mail=GetMailer();
    $mail->SendRegisterMail($email, $nick, $activationUrl);

    TransferTo('resend_succeed');
}
else{
    TransferTo('resend_failed');
}

?>
